package com.yuyou.fn.analyze.service;

import com.github.wens.mybatisplus.plugins.Page;
import com.yuyou.fn.analyze.vo.*;
import com.yuyou.fn.platform.entity.SysUser;
import com.yuyou.fn.settlement.entity.ChangeRecord;
import com.yuyou.fn.settlement.entity.IncomeCategory;
import com.yuyou.fn.settlement.entity.MainAccount;
import com.yuyou.fn.settlement.vo.FeeCategoryTreeMapVo;

import java.util.Date;
import java.util.List;

/**
 *
 * ProductTarget 表数据服务层接口
 *
 */
public interface IBusinessStatisticsService  {


     List<MainAccountCostAndIncome> findMainAccountCostAndIncome(Date startDate, Date endDate, List<MainAccount> mainAccountList);

     CostDetailVo costDetail(Integer detailType, Long feeCategoryId, Long mainAccountId, Date startDate, Date endDate,SysUser sysUser);

     CostDetailVo findCostDetail(Integer detailType, Long feeCategoryId, Long mainAccountId, Date startDate, Date endDate,SysUser sysUser,int pageNo,int pageSize);

     IncomeDetailVo incomeDetail(Integer detailType,Long incomeCategoryId,Long mainAccountId, Date startDate, Date endDate,SysUser sysUser);

     IncomeDetailVo findIncomeDetail(Integer detailType,Long incomeCategoryId,Long mainAccountId, Date startDate, Date endDate,SysUser sysUser,int pageNo,int pageSize);

     List<CategoryMainAccountVo> findBusCostByAreaTeam(Long areaTeamId,Date startDate, Date endDate,SysUser sysUser);

     List<CategoryMainAccountVo> findCostByAllCategory(Long mainAccountId, Date startDate, Date endDate,SysUser sysUser);

     List<CategoryMainAccountVo> findChildCostByParentId(Long feeCategoryId,Long mainAccountId, Date startDate, Date endDate);

     List<CategoryMainAccountVo> toMainAccountCostList(List<FeeCategoryTreeMapVo> feeCategoryTreeMapVoList, List<ChangeRecord> costList,Long mainAccountId);

     void fillAllFeeCategoryId(List<Long> feeCategoryIdList,List<FeeCategoryTreeMapVo> feeCategoryTreeMapVoList);

     List<FeeCategoryTreeMapVo> findChildListByParentId(List<FeeCategoryTreeMapVo> feeCategoryTreeMapVoList,Long parentFeeCategoryId);

     List<CategoryMainAccountVo> findIncomeByAllCategory(Long mainAccountId, Date startDate, Date endDate,SysUser sysUser);

     List<CategoryMainAccountVo> findBusIncomeByArea(Long areaTeamId, Date startDate, Date endDate, SysUser sysUser);

     List<CategoryMainAccountVo> toMainAccountIncomeList(List<IncomeCategory> incomeCategoryList, List<ChangeRecord> incomeList);

    /*课酬明细*/
     List<TeacherClassCostVo> classRemunerationDetail(Long mainAccountId,Long feeCategoryId,Date startDate,Date endDate);

     Page<TeacherClassCostVo> classRemunerationPage(Long mainAccountId,Long feeCategoryId,Date startDate,Date endDate,int pageNo,int pageSize);

    /*课程收入明细*/
     List<ClassIncomeVo> classIncomeDetail(List<Long> mainAccountIdList ,Date startDate,Date endDate);

     Page<ClassIncomeVo> classIncomePage(List<Long> mainAccountIdList , Date startDate, Date endDate,int pageNo,int pageSize);
}